# -*- coding: utf-8 -*-
# @Time    : 2018/12/23/023 21:37
# @Author  : 山那边的瘦子
# @Email   : 690238539@qq.com
# @File    : models.py

# from datetime import datetime
#
#
# class Todo(db.Document):
#     meta = {
#         'collection': 'todo',
#         'ordering': ['-create_at'],
#         'strict': False,
#     }
#     task = db.StringField()
#     create_at = db.DateTimeField(default=datetime.now)
#     is_completed = db.BooleanField(default=False)


from exts import mongo


class IPS(mongo.Document):
    meta = {
        'collection': 'ips',
        'ordering': ['-survival'],
        'strict': True,
    }
    ip = mongo.StringField()  # IP
    port = mongo.StringField()  # 端口
    type = mongo.StringField()  # 类型
    survival = mongo.StringField()  # 存活时间
